<?php


	namespace app\home\validate;


	class AddressValidate extends Base
	{


		protected $rule = [
			['username', 'require', '收件人不能为空'],
			['address', 'require', '详细不能为空'],
			['mobile', 'require|isMobile', '手机号不能为空|手机号格式有误'],
			['address_id', 'require|isInteger', '地址id不能为空|地址id格式错误'],
		];

		protected $scene = [
			'add' => ['username', 'address', 'mobile'],
			'getAddressById'=>['address_id']
		];


	}